<?php
require_once dirname(__FILE__)."/../../classes/Posts.class.php";  

//выборка с бд 5 самых посещаемых постов
$res = Posts::get_popular_posts();
foreach($res as $value) {
    $id = $value['id'];
    $name = $value['name'];
    
   echo <<<LABEL

    <a href="index.php?more=$id">$name</a> <br />

LABEL;

}
?>
